<!doctype html>
<html lang="utf-8" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv=Content-Type content="text/html; charset=utf-8">
    <meta name="author" content="order by baidu.com" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <title>失物认领网-中国最领先的寻物网站失物招领网站</title>
    <meta name="keywords" content="失物认领网,寻物启事,寻人启事,失物招领网,失物认领,找东西,找人,丢东西,招领启事,寻宠启事,找宠物,公交寻物,出租车寻物,寻物网,寻物,失物招领范文,失物招领,找战友,找初恋,失物招领启事,失物招领怎么写,寻物启事范文" />
    <meta name="description" content="失物认领网是一个寻物启事失物招领网站平台，以帮人悦己为理念，以提供贴心，快捷的失物认领服务为原则，以营造爱心网络弘扬拾金不昧的传统美德为宗旨。以免费发布信息的形式，通过寻人启事，寻物启事，寻宠启事，招领启事等专栏，帮您失而复得。/}" />
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <script>
        var serverData = {
            logowidth: '144',
            logoheight: '30',
            coverlogoheight: '50',
            menuCount: 9,
            terms: '',
            menu: [],
            channelname: '',
            device: 'pc'
        }
    </script>
    <script th:src="@{/js/jquery-1.10.1.js}"></script>
    <script th:src="@{/js/layer.js}"></script>
    <link rel="stylesheet" type="text/css" th:href="@{/css/art.css}" href="/skin/css/style.css"/>
    <link rel="stylesheet" type="text/css" th:href="@{/css/style.css}" href="/skin/css/style.css"/>
    <link rel="stylesheet"   type="text/css" th:href="@{/css/layer.css}" >
    <link rel="stylesheet"   type="text/css" th:href="@{/css/layui.css}" href="/skin/layui/css/layui.css">
</head>
<body style="">
<style>
    body {
        padding-top: 0
    }
    #Header {
        position: relative;
    }
</style>
<link rel="stylesheet" type="text/css" href="/skin/layui/css/layui.css">
<div class="wrap">
    <div id="Cover" class="mod-cover">
        <div class="cover">
            <div class="pclogin">
                <div id="userlogin">
                </div>
            </div>
            <div class="coverbg"></div>

            <div class="coverslogan">
                <p class="ll"></p>
                <span style="font-size: 30px">失物招领</span>
                <p class="rl"></p>
            </div>
        </div>
    </div>
    <div id="Header">
        <div class="header">
            <h1 class="test"></h1>
            <div class="logo" style="width:144px;float: left"><a href="/"><img src="/skin/images/logo2.png" style="height:35px"/></a> </div>

            <div class="quan">全国><a href="/forum-5-1.html" style="color:#FFF;">切换城市</a></div>
            <div class="menulist large" style="margin:0 144px">
                <ul>
                    <li class="menu">
                        <a th:href="@{/home}" class="menua">首页</a>
                    </li>
                    <li class="menu">
                        <a th:href="@{/goodslist}" class="menua">失物招领</a>
                    </li>
                    <li class="menu">
                        <a th:href="@{/collectGoodslist}" class="menua">寻物启事</a>
                    </li>
                    <li class="menu">
                        <a th:href="@{/activitylist}" class="menua">活动页面</a>
                    </li>
                </ul>
            </div>
            <div class="menulist medium" style="margin:0 144px">
                <ul></ul>
            </div>
            <div class="headerSearch">
                <form  name="formsearch" action="http://www.shiwurenling.com/plus/search.php">
                    <input type="hidden" name="kwtype" value="0" />
                    <p class="searchbar">
                        <a href="javascript:;" class="searchA"><i class="i"></i></a>
                        <i class="txt"><i class="i nodis"></i><input name="q" type="text" class="nodis"></i>
                    </p>
                    <button type="submit" class="search-submit" style="display: none">搜索</button>
                </form>
                <div class="sub-menu"><script src="http://www.shiwurenling.com/plus/uid.php" language="javascript"></script></div>


            </div>
        </div>
    </div>
    <style>.widde{width:30px}.layui-input-block{margin-left:60px}</style>

    <div id="Body">
        <div class="body">
            <div class="left">
                <div id="banners">
                    <div>
                        <article th:inline="text">
                            <h1>[[${activity.activityTitle}]]</h1>
                            <blockquote class="layui-elem-quote layui-quote-nm">栏目：<a href="">活动中心</a><span lay-separator=""> </span>
                                发布时间：[[${#dates.format(activity.activityCreateTime, 'yyyy-MM-dd HH:mm')}]]<span lay-separator=""> </span></blockquote>
                            <fieldset class="layui-elem-field site-demo-button" style="margin-top: 30px;">
                                <p style="margin: 22px 0px 0px; padding: 0px; font-size: 16px; line-height: 24px; color: rgb(51, 51, 51); text-align: justify; font-family: arial;">
                                    <span class="bjh-p" th:text="${activity.activityBody}">“钱包里会有名片、身份证，手机可以查看通讯录，笔记本电脑可以通过登陆的qq号加失主好友!”保管存放失物其实只是王震工作的一小部分，最重要的工作是要帮这些失物回到主人身边。谈起如何从失物里找到线索，王震更是如数家珍。</span></p>
                            </fieldset>
                            <button onclick="attendActivity()" class="layui-btn" type="button" style="background: #c82b3a;padding:0 40px;margin-left: 830px;height: 50px;font-size: 20px">
                                参加活动</button>
                            <!-- page start -->
                            <div class="pagination"><ul></ul></div>
                            <!-- page end -->
                        </article>
                        <!-- Comment END -->
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div id="Footer">
        <p class="top-nav">
            <span style="color: #000">友情链接：</span>

            <a href="http://www.szlikun.cn/" target="_blank">丽坤网络科技有限公</a>

            <a href="http://www.szlikun.cn/" target="_blank">龙岗建站公司</a>

            <a href="http://www.rbjjz.com" target="_blank">九江信息网</a>

            <a href="http://www.diunal.com/" target="_blank">丢哪了</a>


        </p>

        <p class="site-info">
            <i></i>
            <span>Copyright © 2002-2011 DEDECMS. 织梦科技 版权所有<a href="/" target="_blank">Power by baidu.com</a></span>
        </p>
    </div>
</div>

<div style="height: 70px;"></div>

<style>.layui-card-header{height: auto}article{padding: 5px;}</style>
<script>
    var  user;
    var currentUser;
    $(function () {
        checkLogin()
    })
    function attendActivity() {
      if (user==""){
             layer.alert("请登录后参加")
      }else {
          layer.alert("参加成功");
      }
    }
    function register() {
        var realname=$("input[name='realname']").val();
        var username=$("input[name='new_username']").val();
        var password=$("input[name='new_password']").val();
        if (realname == ''||username == '' || password == ''){
            alert("信息不能为空");
        }else {
            var json={
                'username':username,
                'password':password,
                'realname':realname
            };
            $.ajax({
                type: "post",
                url: "/user/register",
                dataType:"json",
                contentType:"application/json",
                data: JSON.stringify(json),
                success: function(data) {
                    if (data=="succ"){
                        alert("注册成功请登录");
                        layer.close(layer.index);
                    }else {
                        alert("注册失败请重新注册");
                    }
                }
            });
        }
    }
    function login() {
        var username=$("input[name='username']").val();
        var password=$("input[name='password']").val();
        if (username==''||password==''){
            alert("账号和密码不能为空");
        }else {
            var json={
                'username':username,
                'password':password
            };
            $.ajax({
                type: "post",
                url: "/user/login",
                dataType:"json",
                contentType:"application/json",
                data: JSON.stringify(json),
                success: function(data) {
                    if (data=="login_succ"){
                        window.location.reload();
                    }else {
                        alert("账号或密码不正确");
                    }
                }
            });
        }

    }
    function checkLogin() {
        $.ajax({
            type: "post",
            url: "/user/loginCheck",
            success: function(data) {
                user=data;
                currentUser=data;
                if (data==""){
                    $("#userlogin").append(' <div class=\'site-demo-button\' id=\'u_login\' style=\'margin-bottom: 0;\'>\n' +
                        '                    <button data-method=\'notice\' onclick="LoginBtn()" class=\'layui-btn\' style=\'color: #FF0004;background: #FFFFFF;margin-top: 5px;\'>\n' +
                        '                        登录与注册</button></div>');
                }else {
                    $("#userlogin").append(' <a onclick="userInfo()" style="padding-top: 10px"><span style="color: #FFFFFF">欢迎您，'+data.realname+' |</span>\n' +
                        '                        <a href="/user/logout" style="color: #FFFFFF">\n' +
                        '                            退出登录</a></a>');
                }
            }
        });
    }
    function userInfo() {
        layer.open({
            type: 1,
            skin: 'layui-layer-rim', //加上边框
            area: '350px', //宽高
            shade: 0.8,
            btnAlign: 'c'
            ,moveType: 1
            ,btn: [ '关闭'],
            closeBtn: false,
            content: '<fieldset class="layui-elem-field" style="margin:20px">' +
            '<legend>修改个人信息</legend><form name="userlogin" >' +
            '<input type="hidden" name="fmdo" value="login" />' +
            '<input type="hidden" name="dopost" value="login" />' +
            '<input type="hidden" name="userId" value="'+currentUser.id+'" />' +
            '<div class="layui-field-box"><div class="layui-form-item">' +
            '<label class="layui-form-label widde">帐号</label>' +
            '<div class="layui-input-block">' +
            '<input type="text" name="info_username" disabled="disabled" lay-verify="title" autocomplete="off" value="'+currentUser.username+'" class="layui-input">' +
            '</div></div><div class="layui-form-item"><label class="layui-form-label  widde">原密码</label>' +
            '<div class="layui-input-block">' +
            '<input type="password" name="old_password" placeholder="请输入原密码" autocomplete="off" class="layui-input"></div>' +
            ' <div class="layui-form-item"><label class="layui-form-label  widde">新密码</label>' +
            '<div class="layui-input-block">' +
            '<input type="password" name="new_password" placeholder="请输入新密码" autocomplete="off" class="layui-input"></div>' +
            '</div><div class="layui-input-block">' +
            '<button class="layui-btn" type="button" onclick="modify()" style="background-color: #ff1717;">修改</button>' +
            '</div></form></div></fieldset>'
        });
    }
    function modify() {
        var id=$("input[name='userId']").val();
        var password=$("input[name='old_password']").val();
        var newPassword=$("input[name='new_password']").val();
        if (password==''||newPassword==''){
            alert("密码不能为空");
        }else {
            var json={
                'newPassword':newPassword,
                'password':password,
                'id':id
            };
            $.ajax({
                type: "post",
                url: "/user/editInfo",
                dataType:"json",
                contentType:"application/json",
                data: JSON.stringify(json),
                success: function(data) {
                    if (data=="edit_succ"){
                        alert("修改个人信息成功");
                        layer.close(layer.index);
                    }else {
                        alert("密码不正确");
                    }
                }
            });
        }
    }
    function LoginBtn() {
        layer.open({
            type: 1,
            skin: 'layui-layer-rim', //加上边框
            area: '350px', //宽高
            shade: 0.8,
            btnAlign: 'c'
            ,moveType: 1
            ,btn: [ '关闭'],
            closeBtn: false,
            content: '<fieldset class="layui-elem-field" style="margin:20px">' +
            '<legend>用户登录</legend><form name="userlogin" >' +
            '<input type="hidden" name="fmdo" value="login" />' +
            '<input type="hidden" name="dopost" value="login" />' +
            '<input type="hidden" name="keeptime" value="604800" />' +
            '<div class="layui-field-box"><div class="layui-form-item">' +
            '<label class="layui-form-label widde">帐号</label>' +
            '<div class="layui-input-block">' +
            '<input type="text" name="username" lay-verify="title" autocomplete="off" placeholder="请输入帐号" class="layui-input">' +
            '</div></div><div class="layui-form-item"><label class="layui-form-label  widde">密码</label>' +
            '<div class="layui-input-block">' +
            '<input type="password" name="password" placeholder="请输入密码" autocomplete="off" class="layui-input"></div>' +
            '</div><div class="layui-input-block">' +
            '<button class="layui-btn" type="button" onclick="login()" style="background-color: #ff1717;">登录</button>' +
            '<button type="button" class="layui-btn layui-btn-primary" onclick="registerBtn()">注册</button>' +
            '</div></form></div></fieldset><fieldset class="layui-elem-field" style="margin:20px">' +
            '<legend>第三方登录</legend><div class="layui-field-box">' +
            '<a href="#"><img  src="/images/qq_login.png"> ' +
            '</a><a href="#"><img src="/images/1111.png"></a></div></fieldset>'
        });
    }
    function registerBtn() {
        layer.close(layer.index);
        layer.open({
            type: 1,
            skin: 'layui-layer-rim', //加上边框
            area: '350px', //宽高
            shade: 0.8,
            btnAlign: 'c'
            ,moveType: 1
            ,btn: [ '关闭'],
            closeBtn: false,
            content: '<fieldset class="layui-elem-field" style="margin:20px">' +
            '<legend>用户注册</legend><form name="userlogin" >' +
            '<input type="hidden" name="fmdo" value="login" />' +
            '<input type="hidden" name="dopost" value="login" />' +
            '<input type="hidden" name="keeptime" value="604800" />' +
            '<div class="layui-field-box">' +
            '<div class="layui-form-item">' +
            '<label class="layui-form-label  widde">名称</label>' +
            '<div class="layui-input-block"><input type="text" name="realname" placeholder="请输入用户名" autocomplete="off" class="layui-input">' +
            '</div></div>'+
            '<div class="layui-form-item">' +
            '<label class="layui-form-label widde">帐号</label>' +
            '<div class="layui-input-block">' +
            '<input type="text" name="new_username" lay-verify="title" autocomplete="off" placeholder="请输入帐号" class="layui-input">' +
            '</div>' +
            '</div>' +
            '<div class="layui-form-item">' +
            '<label class="layui-form-label  widde">密码</label>' +
            '<div class="layui-input-block">' +
            '<input type="password" name="new_password" placeholder="请输入密码" autocomplete="off" class="layui-input">' +
            '</div></div>' +
            '<div class="layui-input-block">' +
            '<button onclick="register()" class="layui-btn" type="button" style="background-color: #ff1717;">注册</button>' +
            '</div>' +
            '</form>' +
            '</div>' +
            '</fieldset>' +
            '<fieldset class="layui-elem-field" style="margin:20px"><legend>第三方登录</legend>' +
            '<div class="layui-field-box"><a href="#">' +
            '<img src="/images/qq_login.png"> </a><a href="#"><img src="/images/1111.png"></a></div></fieldset>'
        });
    }
</script>

</body>
</html>